<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>个人网上银行</title>

<link rel="stylesheet" href="css/myFile.css" type="text/css"></link>

<link rel="stylesheet" href="css/publicFile.css" type="text/css"></link>


<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>

</head>

<body>
<script type="text/javascript">
		$("document").ready(function() {
			$("input[name=loginAccount]").focusout(function(){
				checkAccount();
			});
			$("input[name=loginPassword]").focusout(function(){
				checkPassword();
			});
			$("input[name=sumbit]").click(function(){
				return clickBtn();
			});
			
			function clickBtn(){
				if(checkAccount() && checkPassword()){
					return true;
				}
				return false;
			}
			
			function checkAccount(){
				if($("input[name=loginAccount]").val() == "" || $("input[name=loginAccount]").val().length !=16){
					alert("请正确填写您的16位卡号!");
					return false;
				}
				return true;
			}
			
			function checkPassword(){
				if($("input[name=loginPassword]").val() == "" || $("input[name=loginPassword]").val().length !=6){
					alert("请正确填写您的6位卡号!");
					return false;
				}
				return true;
			}
		});
</script>
	<div class="main_div">
		<div class="content_div">
			<div class="padding_top20 out_div">
				<div>
					<h2>个人网上银行</h2>
				</div>
				<form action="bankOnlineLoginAction" method="post">
					<div>
						<div>
							<div>
								<label>卡号:</label> <input type="text" id = "loginAccount" name="loginAccount"
									value="6012541025632154" />
							</div>
							<div style="margin-top: 20px;">
								<label>密码:</label> <input type="password" name="loginPassword"
									value="123123" />
							</div>
						</div>
					</div>
					<div style="color:red;">${errorMsg }</div>
					<div style="margin-top: 20px;">
						<input name = "sumbit" type="submit" value="登录网上银行" />
					</div>
				</form>
			</div>
		</div>
	</div>
	
</body>
</html>
